package JVM;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author:谢君臣
 * @Date:2021/9/3-20:33
 * @version:1.0
 * @function:
 */
public class OOM类型 {
    private static int MB = 1024*1024;
    private static List<byte[]> arr = new ArrayList<>();
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            arr.add(new byte[10*MB]);
        }
        Runtime runtime = Runtime.getRuntime();
        System.out.println(runtime.maxMemory());
        Scanner scanner = new Scanner(System.in);
        scanner.nextInt();
    }
}
